1. Technical Field
This disclosure relates to processors, and more particularly to vector instruction execution and prefetch stream detection.
2. Description of the Related Art
Memory prefetching has been widely used for some time. Generally speaking, a processor prefetcher may keep track of previous memory access request addresses. As each request is sent, the prefetcher may compare the new address to the previous addresses to determine whether a particular access pattern exists. The access pattern is commonly referred to as a stream or stream pattern. If the prefetcher detects a stream, the prefetcher may calculate the stride or distance between addresses to determine what the next one or more memory access addresses will be based upon the stream. The prefetcher may then prefetch the data at those one or more addresses into the next level of memory hierarchy. There are a number of different mechanisms that exist to determine the stream.
More particularly, some hardware prefetchers in a conventional processor typically wait for a memory access instruction to execute numerous times to confirm that memory accesses are being performed in a streaming pattern, and to identify the stride of that pattern. If hardware streaming prefetch is initiated too soon (i.e., before a true stream is identified), performance may suffer due to unnecessary memory accesses being performed. If the prefetch is initiated too late, performance may suffer due to memory latency because the data that is requested has not already been fetched from memory.